class CreateTestLogs < ActiveRecord::Migration
  def change
    create_table :test_logs do |t|
      t.references :test_base_data
      t.datetime :executed_at
      t.string :algorithm_name
      t.integer :algorithm_version
      t.integer :forecast_horizon
      t.string :device_model
      t.integer :SO_version
      t.binary :forecasted_data
      t.integer :duration, :limit => 8
      t.integer :memory_used, :limit => 8
      t.float :energy_used

      t.timestamps
    end
    add_index :test_logs, :test_base_data_id
  end
end
